package cn.yunhe.action;

import cn.yunhe.service.AddAdminService;
import cn.yunhe.util.BaseUtil;
import lombok.Data;

@Data
public class AddAdminAction extends BaseUtil {
    private String name;
    private String pass;
    public String execute(){
        AddAdminService addAdminService=new AddAdminService();
        int flag=addAdminService.addAdmin(name,pass);
        if (flag>0)
            return "success";
        else
            return "fail";
    }

}
